
import java.awt.BorderLayout;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JLabel;
import javax.swing.JPanel;


@SuppressWarnings("serial")
public class ComponentPanel extends JPanel {


	Component component=new Empty();
	JLabel label = new JLabel();
	Boolean isHidden,isUsed;
	Image image;
	int size;
	
	public ComponentPanel(int size){
		
		this.size=size;
		setLayout(new BorderLayout());
	    image = component.getImage();
        add(label,BorderLayout.CENTER);
        isHidden = false;
        isUsed= false;
	    putComponent(image);
		
	}
	
	public synchronized  void putComponent(Image image){
		
		this.image=image;
		validate();
		repaint();
		 
	}
	public void paintComponent(Graphics g){
		
		g.drawImage(image, 0, 0, (int)(648/size),(int)(648/size), this);
		
	}
	
}
